<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Spring OAuth Client Thymeleaf</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" />
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-light bg-light shadow-sm p-3 mb-5">
        <a class="navbar-brand" th:href="@{/foos/}">Spring OAuth Client Thymeleaf</a>
        <ul class="navbar-nav ml-auto">
            <li class="navbar-text">Hi, <span sec:authentication="name">username</span>
            </li>
            <li class="nav-item"><a href="/oauth-client-spring/logout" class="btn btn-outline-secondary">Logout</a></li>
        </ul>
    </nav>

    <div class="container">
        <h1>Foos : View all</h1>
        <a th:href="@{/addfoo}" class="btn btn-primary float-right">Create Foo</a>
        <table class="table table-bordered table-striped">
            <thead>
                <tr>
                    <td>ID</td>
                    <td>Name</td>
                </tr>
            </thead>
            <tbody>
                <tr th:if="${foos.empty}">
                    <td colspan="4">No foos</td>
                </tr>
                <tr th:each="foo : ${foos}">
                    <td><span th:text="${foo.id}"> ID </span></td>
                    <td><span th:text="${foo.name}"> Name </span></td>
                </tr>
            </tbody>
        </table>
    </div>

</body>
</html>